package com.atguigu.daijia.order.controller;

import com.atguigu.daijia.common.result.Result;
import com.atguigu.daijia.order.service.TestService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @create: 2024/9/26
 * @author: gyhe10
 * @description: 测试本地锁和分布式锁
 **/

@Tag(name = "测试本地锁和分布式锁的接口")
@RestController
@RequestMapping("/order/test")
@RequiredArgsConstructor
public class TestController {
    private final TestService testService;

    @GetMapping("/testLock")
    public Result testLock() {
        testService.testLock();
        return Result.ok();
    }
}
